
// 颜色按钮事件
function clean_color_button() {
	var id;
	
	id = document.getElementById('color-button-1');
	id.style.color = "#c8c9cb";
	id.style.borderColor = "#c8c9cb";
	
	id = document.getElementById('color-button-2');
	id.style.color = "#c8c9cb";
	id.style.borderColor = "#c8c9cb";
	
}

function color_button_change(id) {
	clean_color_button();
	id.style.color = "#0894ec";
	id.style.borderColor = "#0894ec";
}



// 网络按钮事件
function clean_network_button() {
	var id;
	
	id = document.getElementById('network-button-1');
	id.style.color = "#c8c9cb";
	id.style.borderColor = "#c8c9cb";
	
	id = document.getElementById('network-button-2');
	id.style.color = "#c8c9cb";
	id.style.borderColor = "#c8c9cb";
}

function network_button_change(id) {
	clean_network_button();
	id.style.color = "#0894ec";
	id.style.borderColor = "#0894ec";
}

// 内存按钮事件
function clean_memory_button() {
	var id;
	
	id = document.getElementById('memory-button-1');
	id.style.color = "#c8c9cb";
	id.style.borderColor = "#c8c9cb";
	
	id = document.getElementById('memory-button-2');
	id.style.color = "#c8c9cb";
	id.style.borderColor = "#c8c9cb";
	
	id = document.getElementById('memory-button-3');
	id.style.color = "#c8c9cb";
	id.style.borderColor = "#c8c9cb";
}

function memory_button_change(id) {
	clean_memory_button();
	id.style.color = "#0894ec";
	id.style.borderColor = "#0894ec";
}

//价格按钮
function add_text() {
	if (parseInt(document.getElementById('iphonePart_amount').innerHTML) < 5) {
		document.getElementById('iphonePart_amount').innerHTML ++;
		document.getElementById('iphonePart_money').innerHTML = parseInt(document.getElementById('iphonePart_money').innerHTML) + parseInt(document.getElementById('iphnePart_price').innerHTML); 
	}
	
}

function minus_text() {
	if (parseInt(document.getElementById('iphonePart_amount').innerHTML) > 1) {
		document.getElementById('iphonePart_amount').innerHTML--;
		document.getElementById('iphonePart_money').innerHTML = parseInt(document.getElementById('iphonePart_money').innerHTML) - parseInt(document.getElementById('iphnePart_price').innerHTML); 
	}
	
}


